package net.wangds.common.web.fileupload.repository.db;

import net.wangds.common.web.fileupload.module.UploadFileEntity;
import net.wangds.jpa.repository.RemovableRepo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * .
 * <p></p>
 *
 * @author 王东石 2020/5/15 12:32.
 */
@Repository
public interface UploadFileRepo extends RemovableRepo<UploadFileEntity> {

    boolean existsByMd5(String md5);

    boolean existsByMd5AndSize(String md5, long size);

    List<UploadFileEntity> findByFileOwner(String ownerUid);

    List<UploadFileEntity> findByMd5(String md5);

    List<UploadFileEntity> findByMd5AndSize(String md5, long size);


}
